import request from '@/utils/request'

// 查询年度目标列表
export function listYearTarget(query) {
  return request({
    url: '/system/yearTarget/list',
    method: 'get',
    params: query
  })
}
// 查询月度目标详情
export function listMonthTargetDetail(id) {
  return request({
    url: '/system/yearTarget/listMonthTargetDetail/'+ id,
    method: 'get'
  })
}

// 查询年度目标详细
export function getYearTarget(id) {
  return request({
    url: '/system/yearTarget/' + id,
    method: 'get'
  })
}

// 新增年度目标
export function addYearTarget(data) {
  return request({
    url: '/system/yearTarget',
    method: 'post',
    data: data
  })
}

// 修改年度目标
export function updateYearTarget(data) {
  return request({
    url: '/system/yearTarget',
    method: 'put',
    data: data
  })
}

// 删除年度目标
export function delYearTarget(id) {
  return request({
    url: '/system/yearTarget/' + id,
    method: 'delete'
  })
}
